﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace FinancialReportPowerPointAddIn.Migrations
{
    public partial class _20231117 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Fobs",
                columns: table => new
                {
                    FobId = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Year = table.Column<int>(nullable: false),
                    Month = table.Column<int>(nullable: false),
                    Uscode = table.Column<string>(nullable: true),
                    NetProductSales = table.Column<decimal>(nullable: true),
                    BaseFoodCost = table.Column<decimal>(nullable: true),
                    BaseFoodPercentage = table.Column<double>(nullable: true),
                    EMealCost = table.Column<decimal>(nullable: true),
                    EMealPercentage = table.Column<double>(nullable: true),
                    TargetEMealPercentage = table.Column<double>(nullable: true),
                    CompleteWasteCost = table.Column<decimal>(nullable: true),
                    CompleteWastePercentage = table.Column<double>(nullable: true),
                    TargetCompleteWastePercentage = table.Column<double>(nullable: true),
                    RawWasteCost = table.Column<decimal>(nullable: true),
                    RawWastePercentage = table.Column<double>(nullable: true),
                    TargetRawWastePercentage = table.Column<double>(nullable: true),
                    CommonItemCost = table.Column<decimal>(nullable: true),
                    CommonItemPercentage = table.Column<double>(nullable: true),
                    TargetCommonItemPercentage = table.Column<double>(nullable: true),
                    YieldDiffCost = table.Column<decimal>(nullable: true),
                    YieldDiffPercentage = table.Column<double>(nullable: true),
                    TargetYieldDiffPercentage = table.Column<double>(nullable: true),
                    StatDiffCost = table.Column<decimal>(nullable: true),
                    StatDiffPercentage = table.Column<double>(nullable: true),
                    TargetStatDiffPercentage = table.Column<double>(nullable: true),
                    TotalControlCost = table.Column<decimal>(nullable: true),
                    TotalControlPercentage = table.Column<double>(nullable: true),
                    TargetTotalControlPercentage = table.Column<double>(nullable: true),
                    TotalCost = table.Column<decimal>(nullable: true),
                    TotalCostPercentage = table.Column<double>(nullable: true),
                    PromoCost = table.Column<decimal>(nullable: true),
                    PromoPercentage = table.Column<double>(nullable: true),
                    ActualCost = table.Column<decimal>(nullable: true),
                    ActualCostPercentage = table.Column<double>(nullable: true),
                    OtherAdj = table.Column<decimal>(nullable: true),
                    OtherAdjPercentage = table.Column<double>(nullable: true),
                    UnexplainCost = table.Column<decimal>(nullable: true),
                    UnexplainCostPercentage = table.Column<double>(nullable: true),
                    ActualFOBPercentage = table.Column<double>(nullable: true),
                    TargetFOBPercentage = table.Column<double>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Fobs", x => x.FobId);
                });

            migrationBuilder.CreateTable(
                name: "PeakHourSales",
                columns: table => new
                {
                    PeakHourSalesId = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Uscode = table.Column<string>(nullable: true),
                    PeakDate = table.Column<DateTime>(nullable: false),
                    Category = table.Column<string>(nullable: true),
                    全店Sales = table.Column<decimal>(nullable: false),
                    全店GC = table.Column<decimal>(nullable: false),
                    FCSales = table.Column<decimal>(nullable: false),
                    FCGC = table.Column<decimal>(nullable: false),
                    MDSSales = table.Column<decimal>(nullable: false),
                    MDSGC = table.Column<decimal>(nullable: false),
                    KioskSales = table.Column<decimal>(nullable: false),
                    KioskGC = table.Column<decimal>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PeakHourSales", x => x.PeakHourSalesId);
                });

            migrationBuilder.CreateTable(
                name: "PlatformSales",
                columns: table => new
                {
                    PlatformSalesId = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Year = table.Column<int>(nullable: false),
                    Month = table.Column<int>(nullable: false),
                    Uscode = table.Column<string>(nullable: true),
                    全店产品净收入 = table.Column<decimal>(nullable: false),
                    全店非品净收入 = table.Column<decimal>(nullable: false),
                    全店营业净收入 = table.Column<decimal>(nullable: false),
                    全店SalesComp = table.Column<decimal>(nullable: false),
                    全店GC = table.Column<decimal>(nullable: false),
                    FC产品净收入 = table.Column<decimal>(nullable: false),
                    FC非品净收入 = table.Column<decimal>(nullable: false),
                    FC营业净收入 = table.Column<decimal>(nullable: false),
                    FCSalesComp = table.Column<decimal>(nullable: false),
                    FCGC = table.Column<decimal>(nullable: false),
                    MDS产品净收入 = table.Column<decimal>(nullable: false),
                    MDS非品净收入 = table.Column<decimal>(nullable: false),
                    MDS营业净收入 = table.Column<decimal>(nullable: false),
                    MDSSalesComp = table.Column<decimal>(nullable: false),
                    MDSGC = table.Column<decimal>(nullable: false),
                    Kiosk产品净收入 = table.Column<decimal>(nullable: false),
                    Kiosk非品净收入 = table.Column<decimal>(nullable: false),
                    Kiosk营业净收入 = table.Column<decimal>(nullable: false),
                    KioskSalesComp = table.Column<decimal>(nullable: false),
                    KioskGC = table.Column<decimal>(nullable: false),
                    RemoteKiosk产品净收入 = table.Column<decimal>(nullable: false),
                    RemoteKiosk非品净收入 = table.Column<decimal>(nullable: false),
                    RemoteKiosk营业净收入 = table.Column<decimal>(nullable: false),
                    RemoteKioskSalesComp = table.Column<decimal>(nullable: false),
                    RemoteKioskGC = table.Column<decimal>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PlatformSales", x => x.PlatformSalesId);
                });

            migrationBuilder.CreateTable(
                name: "PLDatas",
                columns: table => new
                {
                    PLDataId = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Restaurant = table.Column<string>(nullable: true),
                    IsPlan = table.Column<bool>(nullable: false),
                    Year = table.Column<int>(nullable: false),
                    Month = table.Column<int>(nullable: false),
                    产品净收入 = table.Column<decimal>(nullable: false),
                    食品成本 = table.Column<decimal>(nullable: false),
                    包装成本 = table.Column<decimal>(nullable: false),
                    运费 = table.Column<decimal>(nullable: false),
                    员工薪资 = table.Column<decimal>(nullable: false),
                    管理组薪资 = table.Column<decimal>(nullable: false),
                    薪资税 = table.Column<decimal>(nullable: false),
                    广告 = table.Column<decimal>(nullable: false),
                    促销 = table.Column<decimal>(nullable: false),
                    外部服务 = table.Column<decimal>(nullable: false),
                    制服 = table.Column<decimal>(nullable: false),
                    营运物料 = table.Column<decimal>(nullable: false),
                    维护保养 = table.Column<decimal>(nullable: false),
                    公共事业 = table.Column<decimal>(nullable: false),
                    办公用品 = table.Column<decimal>(nullable: false),
                    现金分差 = table.Column<decimal>(nullable: false),
                    杂费 = table.Column<decimal>(nullable: false),
                    租金 = table.Column<decimal>(nullable: false),
                    服务费 = table.Column<decimal>(nullable: false),
                    法律费用 = table.Column<decimal>(nullable: false),
                    保险 = table.Column<decimal>(nullable: false),
                    折旧 = table.Column<decimal>(nullable: false),
                    其他费用 = table.Column<decimal>(nullable: false),
                    非产品净收入 = table.Column<decimal>(nullable: false),
                    非产品成本 = table.Column<decimal>(nullable: false),
                    特许经营行政费用 = table.Column<decimal>(nullable: false),
                    再投资 = table.Column<decimal>(nullable: false),
                    利息 = table.Column<decimal>(nullable: false),
                    本金 = table.Column<decimal>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_PLDatas", x => x.PLDataId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Fobs");

            migrationBuilder.DropTable(
                name: "PeakHourSales");

            migrationBuilder.DropTable(
                name: "PlatformSales");

            migrationBuilder.DropTable(
                name: "PLDatas");
        }
    }
}
